package com.pkk.geer.rose.common.enums;

import java.util.Arrays;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @description: 极速数据请求数据类型
 * @author: peikunkun
 * @create: 2019-11-09 17:36
 **/
@Getter
@AllArgsConstructor
public enum RoseSpeenReqTypeEnum {

  /**
   * post
   */
  POST(2),
  /**
   * get
   */
  GET(1);

  private Integer handleType;

  /**
   * @Description: 查询
   * @Param: [handleType]
   * @return: com.pkk.geer.rose.common.enums.RoseSpeenReqTypeEnum
   * @Author: peikunkun
   * @Date: 2019/11/9 0009 下午 5:44
   */
  public static RoseSpeenReqTypeEnum handleType(Integer handleType) {
    return Arrays.stream(RoseSpeenReqTypeEnum.values()).filter(a->a.getHandleType().equals(handleType)).findFirst().orElse(null);
  }

}
